/******************************************************************************\
 * Filename   : enc_output.h
 * Copyright  : 
 * Created    : 2018-11-09 by litao
 * Description:
 * 
\******************************************************************************/

#ifndef __ENC_OUTPUT_H__
#define __ENC_OUTPUT_H__

#include "enc_common.h"

extern "C" {
#include "libavformat/avformat.h"
#include "libavformat/avio.h"
#include "libavcodec/avcodec.h"
#include "libavutil/avutil.h"
#include "libavutil/imgutils.h"
#include "libavutil/opt.h"
#include "libavutil/audio_fifo.h"
#include "libswscale/swscale.h"
#include "libavfilter/avfiltergraph.h"
#include "libavfilter/buffersink.h"
#include "libswresample/swresample.h"
}

typedef struct _enc_out_para
{
	AVFormatContext *p_fmt_ctx;
	char out_url[512];
	char out_fmt[8];  //ts,flv,rtsp
	int bind_stream_flag;  //output format link to actual stream
	int audio_stream_join; //find audio stream
	int video_stream_join; //find video stream
	int no_audio;          //exist audio flag, after find video stream wait one gop
	int no_video;
	int open_out_flag;
	int find_key_frame;
}enc_out_para;

extern void *enc_output_thread(void *p_arg);

#endif

